package com.example.spring.exercise.service.dto.check;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author : zhayh
 * @date : 2021-5-22 19:59
 * @description :
 */

@Data
@NoArgsConstructor
public class ClassCheckAbsentDTO {
    private String classNo;
    private String className;
    private String termNo;
    private Integer classAbsentCount;
    private Integer depAbsentCount;
    private Float absentRatio;
    private Long totalTime;

    public ClassCheckAbsentDTO(ClassInfo classInfo, String termNo, Integer classAbsentCount, Integer depAbsentCount,
                               Float absentRatio) {
        this.setClassNo(classInfo.getClassNo());
        this.setClassName(classInfo.getClassName());
        this.termNo = termNo;
        this.classAbsentCount = classAbsentCount;
        this.depAbsentCount = depAbsentCount;
        this.absentRatio = absentRatio;
    }
}
